package LC.nums.remove;

public class LC283 {
    public static void main(String[] args) {

    }

    public void moveZeroes(int[] nums) {
        if (nums == null || nums.length == 0) return;
        int slowIndex = 0;
        for (int fastIndwex = 0; fastIndwex < nums.length; fastIndwex++) {
            if (nums[fastIndwex] != 0) {
                if (fastIndwex > slowIndex) {
                    nums[slowIndex] = nums[fastIndwex];
                    nums[fastIndwex] = 0;
                }
                slowIndex++;
            }
        }
    }
}
